<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <a href="http://www.baidu.com" @click.prevent="add">+</a>
    <span v-text="count"></span>
    <button type="button" @click="count=count-1">-</button>
</div>

<!--引入vue文件-->
<script type="text/javascript" src="js/vue-2.6.12.js"></script>
<script>
    const v=new Vue({
        el:"#app",
        data:{
            count:0
        },
        methods:{
            add(){
                this.count++;
            }
        }
    });

</script>
</body>
</html>